import request from '@/utils/request'

// 查询课程作业列表
export function listAssignment(query) {
  return request({
    url: '/system/assignment/list',
    method: 'get',
    params: query
  })
}

// 查询课程作业详细
export function getAssignment(id) {
  return request({
    url: '/system/assignment/' + id,
    method: 'get'
  })
}

// 新增课程作业
export function addAssignment(data) {
  return request({
    url: '/system/assignment',
    method: 'post',
    data: data
  })
}

// 修改课程作业
export function updateAssignment(data) {
  return request({
    url: '/system/assignment',
    method: 'put',
    data: data
  })
}

// 删除课程作业
export function delAssignment(id) {
  return request({
    url: '/system/assignment/' + id,
    method: 'delete'
  })
}

// 查询课程分类信息列表
export function courseList() {
  return request({
    url: '/system/course/getCourseList',
    method: 'get'
  })
}

// 查询课程分类信息列表
export function teacherList() {
  return request({
    url: '/system/teacher/getTeacherList',
    method: 'get'
  })
}

// 查询课程作业详细
export function studentList(id) {
  return request({
    url: '/system/student/studentList/' + id,
    method: 'get'
  })
}

// 保存老师批改作业
export function saveHomeWork(data) {
  return request({
    url: '/system/assignment/saveHomeWork',
    method: 'put',
    data: data
  })
}


